package model;

public class ProbabilityUsagetype implements Comparable<ProbabilityUsagetype> {
	private String usageType;
	private double probability;
	private double z;
	
	public ProbabilityUsagetype() {
		
	}
	public ProbabilityUsagetype(String usageType, double probability, double z) {
		this.usageType = usageType;
		this.probability = probability;
		this.z = z;
	}
	public String getUsageType() {
		return usageType;
	}
	public void setUsageType(String usageType) {
		this.usageType = usageType;
	}
	public double getProbability() {
		return probability;
	}
	public void setProbability(double probability) {
		this.probability = probability;
	}
	public double getZ() {
		return z;
	}
	public void setZ(double z) {
		this.z = z;
	}

	@Override
	public int compareTo(ProbabilityUsagetype obj) {
		double otherz = ((ProbabilityUsagetype) obj).getZ();
	    if (this.z > otherz)
	    	return 1;
	    else if (this.z == otherz)
	    	return 0;
	    else //if (this.z < otherz)
	    	return -1;
	}
}
